from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
import xadmin
import os
xadmin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'weatherdb.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^admin/', include(xadmin.site.urls)),
    
    (r'^medias/(?P<path>.*)$', 'django.views.static.serve',
     {'document_root':
          os.path.join(os.path.dirname(__file__), 'medias/').replace('\\', '/')
     }),
) + staticfiles_urlpatterns()
